incdir=-I../include -I../../threadpool/include -I../../utils/include
libdir=.
lib=-lnet_d -lthreadpool_d -lpthread

client=client
server=server
multiserver=multiserver
multiepoll=multiepoll

all:$(client) $(server) $(multiserver) $(multiepoll)

$(client):
	g++ -g client.cpp -o $@ $(incdir) $(lib) -L$(libdir) -Wl,-rpath=$(libdir)

$(server):
	g++ -g server.cpp -o $@ $(incdir) $(lib) -L$(libdir) -Wl,-rpath=$(libdir)

$(multiserver):
	g++ -g multiserver.cpp -o $@ $(incdir) $(lib) -L$(libdir) -Wl,-rpath=$(libdir)

$(multiepoll):
	g++ -g multiepoll.cpp -o $@ $(incdir) $(lib) -L$(libdir) -Wl,-rpath=$(libdir)

clean:
	-rm -f $(client) $(server) $(multiserver) $(multiepoll)
